Dynamic Adaptive Streaming over Hypertext Transfer Protocol (DASH), also known as MPEG-DASH, is developed to enable high quality streaming of media content over the Internet delivered from conventional Hypertext Transfer Protocol (HTTP) web servers. In the DASH architecture, media content can be encoded into media streams at different rates. Media content can be segmented into a plurality of segment files that can be streamed individually and independently from a server or network to a client device, upon receiving request for content from the client. The server also provides media presentation description (MPD) corresponding to a group of segment files, e.g., for a video or program. The MPD includes information that allows the client to play the content. Segments can be obtained by the client using segment templates for generating universal resource locators (URLs) to fetch the content. The segments templates may be provided in the MPD. In the case of encrypted segments, the MPD also includes a key and randomly generated initialization vectors (IVs) that are used with the key for decrypting the segment content at the client side. An efficient representation for IVs is needed to support the segment template mode.